package com.solidumgame.martillo.score
{
	import com.pblabs.engine.PBE;
	import com.pblabs.engine.entity.IEntity;

	public class Score
	{
		
		private var renderer:ScoreRendererComponent;
		private var logic:ScoreLogicComponent;
		private var myEntity:IEntity;
		public function Score()
		{
			logic = new ScoreLogicComponent();
			renderer = new ScoreRendererComponent();
			myEntity = PBE.allocateEntity();
			myEntity.addComponent(logic, "Logic");
			myEntity.addComponent(renderer, "Renderer");
			myEntity.initialize("Score");
		}

		public function remove():void{
			myEntity.destroy();
			
			myEntity = null;
			logic = null;
			renderer = null;
		}
	}
}